Xbasic

A5_REPORTERRORTOUSER Function

Syntax

V a5_reportErrorToUser(C error_message [,* msg [,N style [,* pxdialog ]]])

Arguments

error_message

Error message. Character

msg

*

style

Numeric

pxdialog

*

Description

Used to report an error to a user in a thread safe way - brings up a UI Message box if running in foreground thread, or generates an error if in a background thread.

Discussion

If you have an Alpha Anywhere function that can be called by a .A5W page then it is important that the function does not try to display a UI_MSG_BOX() to report an error, as this is not allowed in a background thread. The solution is to use the A5_REPORTERRORTOUSER() function.

Example

A5_REPORTERRORTOUSER("Invalid value for this field")

See Also